<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/27
 * Time: 19:45
 */
namespace app\admin\model;

use think\Model;

class AuthGroupAccess extends Model {


    public static function getGroupIdByUid($uid){
        return self::where(['u_id'=>$uid])->select();
    }

    public static function delGroupIdByUid($uid){
        return self::where(['u_id'=>$uid])->delete();
    }

    public static function addAuthGroupAccess($data){
        foreach ($data as $k=>$v) {
            $res = self::create($v);
        }
        return $res;
    }
}